<style type="text/css">
#content .event_search td {
    width: 15%;
    text-align: center;
}

#content .event_search td:nth-child(1) {
    text-align: left;
    width: auto;
}

#content .event_search td:nth-child(4) {
    text-align: left;
    width: 25%;
}
</style>

<div id="content">
    <h2>Event Search</h2>
    <div class="searchForm">
        <?=form_open('/student/event_search');?>
        <?=form_input('searchTerm');?>
        <?=form_submit('', 'Search');?>
        <?=form_close();?>
    </div>
    <?php if ($eventList): ?>
        <table class="event_search">
            <tr><th>Event Name</th><th>Group Name</th><th>Description</th><th>Location<th>Date</th> </tr>           
                <?php foreach ($eventList as $event): ?><tr>
                    <td><a href="/student/event_details/<?=$event['event_id'];?>"><?=ucwords($event['event_name']);?></a></td>
                    <td><?=$event['event_group'];?></td>
                    <td><?=$event['event_description'];?></td>
                    <td><?=$event['location_name'];?></td>
                    <td><?=$event['start_date'] . '/' . $event['end_date'];?></td>
                </tr><?php endforeach; ?>
        </table>
    <?php endif; ?>
</div> <!-- #content -->